package com.taixu.apikey.domain.bo;

import com.taixu.common.core.domain.BaseEntity;
import com.taixu.common.core.validate.AddGroup;
import com.taixu.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 平台秘钥业务对象 apikey
 *
 * @author ximu
 * @date 2023-12-14
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class ApiKeyBo extends
    BaseEntity {

    /**
     * keyid
     */
    @NotNull(message = "keyid不能为空", groups = { EditGroup.class })
    private Long keyid;

    /**
     * key
     */
    @NotBlank(message = "key不能为空", groups = { AddGroup.class, EditGroup.class })
    private String keytext;

    /**
     * 查询次数
     */
    @NotNull(message = "查询次数不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long residue;

    /**
     * 创建时间
     */
    @NotNull(message = "创建时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date foundTime;

    /**
     * 推送地址
     */
    @NotBlank(message = "推送地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String pushaddress;
}
